import axios from "axios";

// 创建axios实例
const service = axios.create({
  baseURL: "http://10.2.32.104:8060", // api的base_url
  timeout: 50000, // 请求超时时间
  headers: {
    "Content-Type": "application/x-www-form-urlencoded",
  },
  transformRequest: [
    function (data) {
      let ret = "";
      for (const it in data) {
        ret +=
            encodeURIComponent(it) + "=" + encodeURIComponent(data[it]) + "&";
      }
      return ret;
    },
  ],
});

export default service;
